{
    "resourceType": "Bundle",
    "id": "{{$timestamp}}",
    "meta": {
        "profile": [
            "https://fhir.by/AbstractArea/StructureDefinition/Bundle/MedicationDocument"
        ]
    },
    "identifier": {
        "system": "urn:ietf:rfc:{{$timestamp}}",
        "value": "urn:uuid:{{$timestamp}}"
    },
    "type": "document",
    "timestamp": "2024-07-22T11:12:21+00:00",
    "entry": [
        {
            "fullUrl": "Composition/{{$timestamp}}",
            "resource": {
                "resourceType": "Composition",
                "id": "{{$timestamp}}",
                "meta": {
                    "profile": [
                        "https://fhir.by/StructureDefinition/CompDocument"
                    ]
                },
                "status": "final",
                "type": {
                    "coding": [
                        {
                            "system": "https://fhir.by/ValueSet/CompositionType",
                            "code": "general"
                        }
                    ]
                },
                "subject": [
                    {
                        "reference": "Patient/pa-69377c81-92ea-11f0-aa4b-78d8e5545e22",
                        "display": "Тестируем Еами Васильевич"
                    }
                ],
                "date": "2024-07-22T11:12:21Z",
                "author": [
                    {
                        "reference": "Practitioner/a9fd2189-fe85-11ef-9450-1d25bbc3f449",
                        "display": "Майстрова Елизавета Андреевна"
                    }
                ],
                "title": "Discharge Summary",
                "custodian": {
                    "reference": "Organization/a1a103d1-bf02-4c95-818a-3e3bc32cabe0",
                    "display": "Государственное научное учреждение \"ОБЪЕДИНЕННЫЙ ИНСТИТУТ ПРОБЛЕМ ИНФОРМАТИКИ НАЦИОНАЛЬНОЙ АКАДЕМИИ НАУК БЕЛАРУСИ\"""
                }
            }
        },
        {
            "fullUrl": "Patient/pa-69377c81-92ea-11f0-aa4b-78d8e5545e22",
            "resource": {
                "resourceType": "Patient",
                "id": "pa-69377c81-92ea-11f0-aa4b-78d8e5545e22",
                "meta": {
                    "profile": [
                        "https://fhir.by/StructureDefinition/PatientWithIdentificationNumber"
                    ]
                },
                "identifier": [
                    {
                        "use": "usual",
                        "type": {
                            "coding": [
                                {
                                    "system": "https://fhir.by/ValueSet/PersonalDocumentType",
                                    "code": "INP"
                                }
                            ]
                        },
                        "value": "7551306A009PB6"
                    }
                ],
                "active": true,
                "name": [
                    {
                        "family": "Тестируем",
                        "given": [
                            "Еами",
                            "Васильевич"
                        ]
                    }
                ],
                "telecom": [
                    {
                        "system": "phone",
                        "value": "89001234567"
                    }
                ],
                "gender": "male",
                "birthDate": "1989-01-31",
                "deceasedBoolean": false,
                "address": [
                    {
                        "use": "home",
                        "line": [
                            "Минск, г. Минск"
                        ],
                        "city": "г. Минск",
                        "state": "Минск",
                        "postalCode": "209124",
                        "country": "Беларусь",
                        "text": "Минск, г. Минск"
                    }
                ]
            }
        },
        {
            "fullUrl": "Condition/666",
            "resource": {
                "resourceType": "Condition",
                "id": "5859bc86-2c78-4057-aedf-45dfc8070a50",
                "meta": {
                    "profile": [
                    "https://fhir.by/StructureDefinition/FinalDiagnosis"
                    ]
                },
                "extension": [
                    {
                    "url": "https://fhir.by/StructureDefinition/KindOfDiagnosis",
                    "valueCodeableConcept": {
                        "coding": [
                        {
                            "system": "https://fhir.by/ValueSet/KindOfDiagnosisCode",
                            "code": "Preliminary"
                        }
                        ]
                    }
                    },
                    {
                    "url": "https://fhir.by/StructureDefinition/AssertedDate",
                    "valueDateTime": "2023-12-26"
                    }
                ],
                "clinicalStatus": {
                    "coding": [
                    {
                        "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
                        "code": "active"
                    }
                    ]
                },
                "code": {
                    "coding": [
                    {
                        "system": "https://fhir.by/ValueSet/InternClassificDiseases10",
                        "code": "O14.0",
                        "display": "O14.0 - Преэклампсия от легкой до средней степени тяжести"
                    }
                    ]
                },
                "subject": {
                    "reference": "Patient/pa-69377c81-92ea-11f0-aa4b-78d8e5545e22",
                    "display": "Тестируем Еами Васильевич"
                },
                "onsetDateTime": "2023-12-26",
                "recordedDate": "2023-12-26",
                "note": [
                    {
                    "text": "Преэклампсия средней тяжести"
                    }
                ]
                }
        },
        {
            "fullUrl": "Encounter/123123",
            "resource": {
                    "resourceType": "Encounter",
                    "id": "123123",
                    "meta": {
                        "profile": [
                        "https://fhir.by/StructureDefinition/EncounterGeneral"
                        ]
                    },
                    "extension": [
                        {
                        "url": "https://fhir.by/StructureDefinition/EncounterTypeOfVisit",
                        "valueCodeableConcept": {
                            "coding": [
                            {
                                "system": "https://fhir.by/ValueSet/EncounterTypeOfVisit",
                                "code": "primary",
                                "display": "Первичное обращение"
                            }
                            ]
                        }
                        },
                        {
                        "url": "https://fhir.by/StructureDefinition/EncounterTypeOfService",
                        "valueCodeableConcept": {
                            "coding": [
                            {
                                "system": "https://fhir.by/ValueSet/EncounterTypeOfService",
                                "code": "free",
                                "display": "Бесплатные услуги"
                            }
                            ]
                        }
                        }
                    ],
                    "status": "completed",
                    "class": [
                        {
                        "coding": [
                            {
                            "system": "https://fhir.by/ValueSet/VSTermsOfService",
                            "code": "1",
                            "display": "амбулаторные"
                            }
                        ]
                        }
                    ],
                    "priority": {
                        "coding": [
                        {
                            "system": "https://fhir.by/ValueSet/HealthCareForms",
                            "code": "planned",
                            "display": "Плановая медицинская помощь"
                        }
                        ]
                    },
                    "type": [
                        {
                        "coding": [
                            {
                            "system": "https://fhir.by/ValueSet/TypeOfHealthCare",
                            "code": "special",
                            "display": "Специализированная медицинская помощь"
                            }
                        ]
                        }
                    ],
                    "subject": {
                        "reference": "Patient/pa-69377c81-92ea-11f0-aa4b-78d8e5545e22"
                    },
                    "serviceProvider": {
                        "reference": "Organization/a1a103d1-bf02-4c95-818a-3e3bc32cabe0"
                    },
                    "participant": [
                        {
                        "actor": {
                            "reference": "PractitionerRole/90e87d84-1b67-11f0-8257-f1172741d6fc"
                        }
                        }
                    ],
                    "actualPeriod": {
                        "start": "2025-09-15T10:10:21Z",
                        "end": "2025-09-15T12:00:21Z"
                    },
                    "reason": [
                        {
                        "use": [
                            {
                            "coding": [
                                {
                                "system": "https://fhir.by/ValueSet/EncounterReasons",
                                "code": "ther-and-diagn",
                                "display": "лечебно-диагностическая"
                                }
                            ]
                            }
                        ]
                        }
                    ],
                    "diagnosis": [
                        {
                        "condition": [
                            {
                            "reference": {
                                "reference": "Condition/666"
                            }
                            }
                        ],
                        "use": [
                            {
                            "coding": [
                                {
                                "system": "https://fhir.by/ValueSet/TypeOfDiagnosis",
                                "code": "mainDiagnosis",
                                "display": "Основной диагноз"
                                }
                            ]
                            }
                        ]
                        }
                    ]
            }
        },
        {
            "fullUrl": "ServiceRequest/123123",
            "resource": {
                "resourceType": "ServiceRequest",
                "meta": {
                    "profile": [
                        "https://fhir.by/StructureDefinition/ServiceRequestImaging"
                    ]
                },
                "extension": [
                    {
                        "url": "https://fhir.by/StructureDefinition/SpecialtyCode",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://fhir.by/ValueSet/ServiceSpecialtyBy",
                                    "code": "C001"
                                }
                            ]
                        }
                    },
                    {
                        "url": "https://fhir.by/StructureDefinition/RequestFromOrganization",
                        "valueReference": {
                            "reference": "Organization/a1a103d1-bf02-4c95-818a-3e3bc32cabe0"
                        }
                    }
                ],
                "identifier": [
                    {
                        "value": "123",
                        "assigner": {
                            "reference": "Organization/a1a103d1-bf02-4c95-818a-3e3bc32cabe0"
                        }
                    }
                ],
                "status": "active",
                "intent": "order",
                "priority": "routine",
                "code": {
                    "concept": {
                        "coding": [
                            {
                                "system": "https://fhir.by/ValueSet/DiagnosticType",
                                "code": "Chest X-ray"
                            }
                        ]
                    }
                },
                "reason": [
                    {
                        "reference":{
                            "reference": "Condition/666"
                        }
                    }
                ],
                "subject": {
                    "reference": "Patient/pa-69377c81-92ea-11f0-aa4b-78d8e5545e22"
                },
                "authoredOn": "2025-03-19",
                "requester": {
                    "reference": "PractitionerRole/90e87d84-1b67-11f0-8257-f1172741d6fc"
                },
                "note": [
                    {
                        "text": "Одиночный ServiceRequst"
                    }
                ],
                "location": [
                    {
                        "reference": {
                            "reference": "Location/7cfdb8e9-6bae-4a96-91e6-9289d26e07b3"
                        }
                    }
                ]
            }
        },
        {
            "fullUrl": "ImagingStudy/{{$timestamp}}",
            "resource": {
                "resourceType": "ImagingStudy",
                "id": "{{$timestamp}}",
                "meta": {
                    "lastUpdated": "2025-06-10T13:20:19.3443882+03:00",
                    "profile": [
                        "https://fhir.by/StructureDefinition/ImagingStudyBy"
                    ]
                },
                "extension": [
                    {
                        "url": "https://fhir.by/StructureDefinition/imageState",
                        "valueCodeableConcept": {
                            "coding": [
                                {
                                    "system": "https://fhir.by/ValueSet/ImageState",
                                    "code": "active",
                                    "display": "Активное"
                                }
                            ]
                        }
                    }
                ],
                "identifier": [
                    {
                        "value": "897t2y93u497236t84293",
                        "assigner":                     {
                            "reference": "PractitionerRole/90e87d84-1b67-11f0-8257-f1172741d6fc"
                        }
                    }
                ],
                "status": "available",
                "modality": [
                    {
                        "coding": [
                            {
                                "system": "https://fhir.by/ValueSet/DICOMmodalities",
                                "code": "OT",
                                "display": "Другое"
                            }
                        ]
                    }
                ],
                "subject": {
                    "reference": "Patient/pa-69377c81-92ea-11f0-aa4b-78d8e5545e22"
                },
                "started": "2025-12-18T13:20:19.3468741+03:00",
                "referrer": {
                    "reference": "PractitionerRole/90e87d84-1b67-11f0-8257-f1172741d6fc"
                },
                "procedure": [
                    {
                        "concept": {
                            "coding": [
                                {
                                    "system": "https://fhir.by/ValueSet/ImagingStudyCode",
                                    "code": "RPID10",
                                    "display": "КТ ангиография нижних конечностей с и без внутривенного контраста"
                                }
                            ]
                        }
                    }
                ],
                "basedOn": [
                    {
                        "reference": "ServiceRequest/123123"
                    }
                ],
                "series": [
                    {
                        "extension": [
                            {
                                "url": "https://fhir.by/StructureDefinition/ImagingStudyLink",
                                "valueString": "active"
                            }
                        ],
                        "uid": "134523453254",
                        "modality": {
                            "coding": [
                                {
                                    "system": "https://fhir.by/ValueSet/DICOMmodalities",
                                    "code": "OT",
                                    "display": "Другое"
                                }
                            ]
                        },
                        "started": "2025-12-18T13:20:19.3480273+03:00",
                        "instance": [
                            {
                                "uid": "64536154324",
                                "sopClass": {
                                    "system": "https://fhir.by/ValueSet/SOPclasses",
                                    "code": "1.2.840.10008.5.1.4.1.1.2",
                                    "display": "Хранение инкапсулированного MTL"
                                }
                            }
                        ]
                    }
                ]
            }
        },
        {
            "fullUrl": "DiagnosticReport/{{$timestamp}}",
            "resource": {
                "resourceType": "DiagnosticReport",
                "id": "{{$timestamp}}",
                "meta": {
                    "profile": [
                        "https://fhir.by/StructureDefinition/ImagingDiagnosticReport"
                    ]
                },
                "identifier": [
                    {
                        "value": "123",
                        "assigner": {
                            "reference": "Organization/a1a103d1-bf02-4c95-818a-3e3bc32cabe0"
                        }
                    }
                ],
                "status": "final",
                "code": {
                    "coding": [
                        {
                            "system": "https://fhir.by/ValueSet/ImagingStudyCode",
                            "code": "RPID10"
                        }
                    ]
                },
                "subject": {
                    "reference": "Patient/pa-69377c81-92ea-11f0-aa4b-78d8e5545e22"
                },
                "issued": "2025-07-14T12:39:10.1396819+03:00",
                "resultsInterpreter": [
                    {
                        "reference": "PractitionerRole/90e87d84-1b67-11f0-8257-f1172741d6fc"
                    }
                ],
                "note": [
                    {
                        "text": "Проведено МР-исследование скорости кровотока сердца.\n               Получены данные о фазовых потоках через клапанные структуры, записаны параметры кровотока."
                    }
                ],
                "basedOn": [
                    {
                        "reference": "ServiceRequest/123123"
                    }
                ],
                "study": [
                    {
                        "reference": "ImagingStudy/{{$timestamp}}"
                    }
                ],
                "conclusion": "Какое-то описание"
            }
        }
    ]
}